<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .dialog{
            width:300px;
            height: 100px;
            border:1px solid gray;
            position: absolute;
            top:50%;
            left:50%;
            margin-left:-150px;
            margin-top:-50px;
        }
    </style>
</head>
<body>
    <div>
        <button id="open">打开弹窗</button>
        <button id="close">关闭弹窗</button>
        <button id="public">发布动态</button>
    </div>
    <script src="./观察者模式.js"></script>
</body>
</html>